<?php
include '../public/header.php';
?>
<link rel="stylesheet" href="../css/base.css">
<style>
.login-item{
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    left:0;
    margin:auto;
    padding:20px;
    width:360px;
    height:260px;
    background-color:#f5f5f5;    
    border-radius:6px;
}
.page-title{
    margin-top:10px;
    margin-bottom:30px;
}
.form-login div{
    margin-bottom:10px;    
}
.form-login input{
    padding:6px;
}
.form-login img{
    position:relative;
    top:10px;
}
.form-login button{
    width:100px;
    height:30px;
    margin-left:70px;
    margin-top:15px;
}

</style>
<div class="login-item" ng-app="loginAdminApp" ng-controller="LoginAdminCtrl">
<h2 class="page-title">后台登录</h2>
<form action="index.php" method="post" class="form-login">
    <div>
        <label for="">用户名：</label>
        <input type="text" name="username">
    </div>
    <div>
        <label for="">密 &nbsp; 码：</label>
        <input type="password" name="pswd">
    </div>
    <div>
        <label for="">验证码：</label>
        <input type="text" name="authCode">
        <img src="{{authPath}}" alt="" ng-click="changeAuthCode()">
    </div>
    <button type="submit">登录</button>
</form>
</div>
<script src="../lib/angularJs/angular.min.js"></script>
<script>
var app=angular.module('loginAdminApp',[]);
app.controller('LoginAdminCtrl',function($scope){
    // 验证码的值
    $scope.authPath='../public/authCode.php';
    $scope.changeAuthCode=function(){
        $scope.authPath='../public/authCode.php?t='+(new Date()).getTime();        
    }
});

</script>
<?php
include '../public/footer.php';
?>